package com.itheima.health.service.impl;

import com.itheima.health.dao.RolePermissionDao;
import com.itheima.health.pojo.RolePermission;
import com.itheima.health.service.RolePermissionService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Slf4j
@DubboService
public class RolePermissionServiceImpl implements RolePermissionService {

    @Autowired
    private RolePermissionDao rolePermissionDao;

    @Override
    public List<RolePermission> findById(Integer id) {
        RolePermission newRolePermission = new RolePermission();
        newRolePermission.setRoleId(id);
        List<RolePermission> permissionList = rolePermissionDao.select(newRolePermission);
        log.info("[role&permission表-findById-返回值] - permissionList: {}",permissionList);
        return permissionList;
    }
}
